package com.zw.rpc.codec.impl;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zw.rpc.codec.Decoder;
import com.zw.rpc.codec.Encoder;

import java.util.Arrays;

/**
 * @author zw
 */
public class JsonDecoder implements Decoder {

    @Override
    public <T> T decode(byte[] bytes, Class<T> clazz) {
        return JSON.parseObject(bytes, clazz);
    }
}
